package com.ttwm.service;

import com.ttwm.dao.UserDao;
import com.ttwm.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImp implements UserService {
    @Autowired
    private UserDao userDao;

    @Override
    public int insertUser(User user) {
        return userDao.insertUser(user);
    }

    @Override
    public User loginUser(User user) {
        return userDao.loginUser(user);
    }

    @Override
    public User oneUser(User user) {
        return userDao.oneUser(user);
    }

    @Override
    public List<User> allUser() {
        return userDao.allUser();
    }

    @Override
    public User phoneUser(User user) {
        return userDao.phoneUser(user);
    }

    @Override
    public int updateUser(User user) {
        return userDao.updateUser(user);
    }

    @Override
    public int deleteUser(User user) {
        return userDao.deleteUser(user);
    }
}
